<template>
    <div>
            <table>
                <tbody>
                    <tr>
                        <td>id</td>
                        <td>用户名</td>
                        <td>性别</td>
                        <td>生日</td>
                        <td>家庭地址</td>
                        <td>积分</td>
                        <td>余额</td>
                    </tr>
                    <tr v-for="item in data.list">
                        <td>{{ item.Id }}</td>
                        <td>{{ item.Name }}</td>
                        <td>{{ item.Sex }}</td>
                        <td>{{ item.Birthday }}</td>
                        <td>{{ item.Address }}</td>
                        <td>{{ item.Jifen }}</td>
                        <td>{{ item.Money }}</td>
                    </tr>
                </tbody>
            </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ListFormat } from 'typescript';
import { ref,reactive,onMounted } from 'vue';

onMounted(()=>{
    ShowMember();
})

let data:any=reactive({
    list:[]
})


const ShowMember=()=>{
    axios({
        method:"get",
        url:"https://localhost:7155/api/Member/ShowMember",
    })
    .then(res=>{
        console.log(res);
        data.list=res.data;
    })
    .catch(err=>{
        console.log(err);
    })
}






</script>












<style scoped>

</style>
